]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay/baseAppView: Use a separate flag for animated indicators
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 2 Dec 2020 21:35:38 +0000 (18:35 -0300)
committerMarge Bot <marge-bot@gnome.org>
Wed, 2 Dec 2020 22:43:04 +0000 (22:43 +0000)
In the future, both AppDisplay and FolderView will be horizontal, and thus
using the orientation to determine whether to use animated indicators won't
be enough.

Use a different flag to control that, and make FolderView not use animated
page indicators.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1518>

js/ui/appDisplay.js

index a86f32a3b082275088b99117d216936d5050fe65..71aee7bc3bc0fc8c220754a94e35ffeb54b316f9 100644 (file)
@@ -127,6 +127,11 @@ var BaseAppView = GObject.registerClass({
     },
 }, class BaseAppView extends St.Widget {
     _init(params = {}, orientation = Clutter.Orientation.VERTICAL) {
+        params = Params.parse(params, { animateIndicators: true }, true);
+
+        const animateIndicators = params.animateIndicators;
+        delete params.animateIndicators;
+
         super._init(params);
 
         this._grid = this._createGrid();
@@ -160,7 +165,7 @@ var BaseAppView = GObject.registerClass({
         });
 
         // Page Indicators
-        if (vertical)
+        if (animateIndicators)
             this._pageIndicators = new PageIndicators.AnimatedPageIndicators(orientation);
         else
             this._pageIndicators = new PageIndicators.PageIndicators(orientation);
@@ -1687,6 +1692,7 @@ class FolderView extends BaseAppView {
             layout_manager: new Clutter.BinLayout(),
             x_expand: true,
             y_expand: true,
+            animateIndicators: false,
         }, Clutter.Orientation.HORIZONTAL);
 
         // If it not expand, the parent doesn't take into account its preferred_width when allocating